#include "common\Debug.h"

int vdebug_printf(const char* format,va_list argList)
{
	const unsigned int MAX_CHARS=1023;
	static char s_buffer[MAX_CHARS+1];
	int charsWritten=vsnprintf_s(s_buffer,sizeof(s_buffer),MAX_CHARS,format,argList);
	s_buffer[MAX_CHARS]='\0';
	OutputDebugString(s_buffer);
	return charsWritten;
}

int debug_printf(const char* format,...)
{
	va_list argList;
	va_start(argList,format);
	int charsWritten=vdebug_printf(format,argList);
	va_end(argList);
	return charsWritten;
}